home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global oStoryteller, oPuppeteer, gFreezeInventory, gOriginPoint
- set currentLoc to getState(oStoryteller, #currentLocation)
- set portalLocations to [#GgazPath_A_up, #Ggaz_B_W_up, #Ggaz_C_S_up, #Ggaz_D_E_up, #Ggaz_E_N_up, #Gbhs_B_E, #MargEntry, #MargPortal_Ewall]
- if getPos(portalLocations, currentLoc) = 0 then
- set hasPortalLoop to 0
- else
- set hasPortalLoop to 1
- end if
- if (getState(oStoryteller, #itemInUse) = #none) and not gFreezeInventory then
- endLoop(#amberHum)
- set the volume of sound 5 to 0
- if getState(oStoryteller, #endGame) = 1 then
- setState(oStoryteller, #AMBERVISION, #off)
- set the loc of sprite 39 to point(-1000, -1000) + gOriginPoint
- puppetSprite(39, 0)
- if hasPortalLoop = 1 then
- killVideo()
- end if
- updateDisplay(oPuppeteer)
- addInventory(#Headgear, #quietly)
- useInventory(#Headgear)
- else
- setState(oStoryteller, #AMBERVISION, #off)
- wait(5)
- set the castNum of sprite 39 to getProp(the lsForegroundData of oPuppeteer, #HeadgearOff)
- if hasPortalLoop = 1 then
- killVideo()
- end if
- updateDisplay(oPuppeteer)
- wait(5)
- addInventory(#Headgear)
- end if
- end if
- end
-